/**
 * 
 */
package com.zhaoyan.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zhaoyan.entity.Order;
import com.zhaoyan.entity.OrderVo;
import com.zhaoyan.mapper.OrderMapper;
import com.zhaoyan.service.OrderService;

/**
 * @author zhaoyan
 *
 * 2020年2月10日
 */
@Service
public class OrderServiceImpl implements OrderService{
	
	
	@Autowired
	private OrderMapper  orderMapper;

	@Override
	public Integer addOrder(Order order) {
		// TODO Auto-generated method stub
		return orderMapper.addOrder(order);
	}

	@Override
	public PageInfo<Order> orderList(Integer pageNum, OrderVo order) {
		// TODO Auto-generated method stub
		PageHelper.startPage(pageNum, 10);
		
		return new PageInfo<Order>(orderMapper.orderList(order));
	}

	@Override
	public Integer delList(List<Integer> ids) {
		// TODO Auto-generated method stub
		return orderMapper.delList(ids);
	}

	@Override
	public Order showDetail(Integer id) {
		// TODO Auto-generated method stub
		return orderMapper.showDetail(id);
	}

}
